#!/bin/bash
# date 2023-06-15
# used for centos7 install usually softwares.

echo "Start to config yum repo"
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
yum makecache fast


echo "Start to install system tools"
yum install -y bzip2 zip unzip lrzsz psmisc sshpass expect tree dos2unix nc patch bash-completion ipmitool yum-utils glances sysstat iftop iotop atop htop lsof nmon csh ntp iptables tmux ansible

echo "Start to install perf or bench tools"
yum install -y sysbench stress stress-ng fio iperf iperf3 

echo "Start to install network tools"
yum install -y net-tools nmap netcat hping3 mtr telnet  bind-utils httpd-tools wget curl tcpdump

yum install -y NetworkManager-tui 

echo "Start to install storage tools"
yum install -y dstat ncdu nfs-utils s3cmd iscsi-initiator-utils scsi-target-utils cloud-utils-growpart

echo "Start to install program tools"
yum install -y gcc* make automake kernel-devel vim  vim-enhanced
yum groupinstall -y "Development Tools" "Development Libraries"
yum install -y git php-devel php-pear libstdc++-devel
yum install -y java python python3 python3-devel
yum install -y golang

echo "Start to install common application servers"
yum install -y telnet-server httpd httpd-devel nginx bind-utils nscd nfs-utils rpcbind

echo "Start to install docker"
yum install -y docker

echo "Start to clean yum cache"
yum clean all
